package com.gpframework.module.purchase.domain.req;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gpframework.common.utils.StringUtils;
import com.gpframework.module.base.domain.req.BaseReq;
import com.gpframework.module.purchase.domain.GpPurchaseQualityFeedbackQuestion;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.math.BigDecimal;

import java.util.Date;

/**
 * @ClassName GpPurchaseQualityFeedbackQuestionReq
 * @Author gpframework
 * @Date 2024-01-09
 * @Version 1.0.0
 * @Description 列表查询信息体
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
public class GpPurchaseQualityFeedbackQuestionReq extends BaseReq {
    private static final long serialVersionUID = 1L;

         @ApiModelProperty("品质反馈id")
     private Long qualityFeedbackId;
     @ApiModelProperty("回复类型")
     private String replyType;
     @ApiModelProperty("回复内容")
     private String replyContent;

    /**
    * @Description 生成查询wrapper
    * @Author greatplan@qq.com
    * @Date 2020-11-04 16:04
    * @Param [lqw]
    * @Param [isVO] 是否vo查询体，true的话走的是mapper.xml里面的查询语句，不过查询语法还是mybatis-plus，主要用于某些关联查询出一些非数据表字段
    * @Return void
    */
    public void generatorQuery(QueryWrapper<GpPurchaseQualityFeedbackQuestion> lqw,boolean isVo) {
        String alias = "";
        if (isVo) {
            alias = "gp.";
            lqw.eq(alias+"del_status",0);
        }
        if (this.getQualityFeedbackId() != null){
        lqw.eq(alias+"quality_feedback_id" ,this.getQualityFeedbackId());
        }
        if (StringUtils.isNotBlank(this.getReplyType())){
        lqw.eq(alias+"reply_type" ,this.getReplyType());
        }
        if (StringUtils.isNotBlank(this.getReplyContent())){
        lqw.eq(alias+"reply_content" ,this.getReplyContent());
        }
    }
}
